package com.example.bzstock;

import android.os.Bundle;
import android.util.DisplayMetrics;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.WindowManager;

import com.example.bzstock.comm.Comm;

public class MainActivity extends BaseActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

		// 读取屏幕分辨率容器
		DisplayMetrics dMetrics = new DisplayMetrics();
		((WindowManager) getWindowManager()).getDefaultDisplay().getMetrics(
				dMetrics);
		Comm.screenWidth = dMetrics.widthPixels;
		Comm.screenHeight = dMetrics.heightPixels;

		findViewById(R.id.main_title).setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				gotoActivity(M1K12Activity.class);
			}
		});
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true;
	}

}
